//
//  UIView+TLUIView.h
//  PiyingkeLibrary
//
//  Created by Tianlong on 2017/5/22.
//
//

#import <UIKit/UIKit.h>


@interface UIView (TLUIView)
+ (id)loadFromNib;

@property (nonatomic , weak) CAShapeLayer *cornerLayer;

@property (nonatomic, assign) CGFloat x;
@property (nonatomic, assign) CGFloat y;
@property (nonatomic, assign) CGFloat centerX;
@property (nonatomic, assign) CGFloat centerY;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@property (nonatomic, assign) CGSize size;

#pragma mark - 获取当前view所在的控制器
/**
 获取当view所在的控制器,如果带导航则直接返回,如果不带导航则返回跟控制器
 */
-(UINavigationController *)getCurrentNavViewController;
/**
 获取当前view所在的控制器
 */
-(UIViewController *)getCurrentVC;

#pragma mark - 给view添加虚线框
/**
 给view添加虚线框
 @param color 虚线颜色
 @param inRect 虚线范围;
 @param lineCap 虚线边角，与贝塞尔style密切相关
 @param lineWidth 虚线高度
 */
-(void)setupDottedLineColor:(UIColor *)color inRect:(CGRect)inRect lineCap:(NSString *)lineCap lineWidth:(CGFloat)lineWidth;

-(void)findSubViews;
@end
